﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Json;
using Volo.Abp.Modularity;

namespace Volo.Abp.SqlSugarCore
{
    public class SqlSugarSerializeService : ISerializeService, ISingletonDependency
    {
        private readonly IJsonSerializer _jsonSerializer;
        public SqlSugarSerializeService(IJsonSerializer jsonSerializer)
        {
            _jsonSerializer = jsonSerializer;
        }
        public T DeserializeObject<T>(string value)
        {
            return _jsonSerializer.Deserialize<T>(value);
        }

        public string SerializeObject(object value)
        {
            return _jsonSerializer.Serialize(value);
        }

        public string SugarSerializeObject(object value)
        {
            return _jsonSerializer.Serialize(value);
        }
    }
}
